home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGBLER / A86V318A.LZH / A00.DOC next >
Text File  |  1988-07-22  |  14KB  |  300 lines

  1. A86 assembler package   V3.18           July 22, 1988
  2.  
  3. The entire package is Copyright 1986-1988 Eric Isaacson.
  4. All rights reserved.
  5.  
  6. For easier bulletin-board distribution, I have split this 
  7. package into three ARC files, A86V318A.ARC, A86V318B.ARC, and 
  8. A86V318C.ARC.  The first file contains enough to get you 
  9. started; you can evaluate the package and then download the 
  10. second and third files later on. 
  11.  
  12. PLEASE read Chapter 1 for legal terms and conditions, how to 
  13. register for the package, and the overview of the assembler. 
  14.  
  15.  
  16. QUESTION: "I bought this assembler from XYZ Software House, 
  17.   that advertised great software for $5 per disk.  What's 
  18.   going on here?  Have I already bought an assembler, or 
  19.   what?" 
  20.  
  21. ANSWER: Well, no, not exactly.  You've bought a disk that has 
  22.   great software on it; you haven't bought the software yet. 
  23.   A86, like the vast majority of software offered by the $5-
  24.   per-disk distribution houses, is free-distribution software 
  25.   (also known as "shareware", or "user-supported software").  
  26.   That means I retain the rights to A86, but I choose to let 
  27.   people pass it around.  I have no business relationship 
  28.   with any distribution houses in the U.S.; I don't get a 
  29.   penny of the $5 (or whatever) you paid them for the disk 
  30.   containing A86.  So I need and expect to be paid by you, 
  31.   because I'm trying to make a living out of making and 
  32.   supporting shareware products. 
  33.  
  34.   Many distribution houses do a pretty poor job of revealing 
  35.   the shareware nature of the software they sell.  If you 
  36.   thought you had purchased the software free and clear, you 
  37.   might feel justified in being angry with them for having 
  38.   misled you.  And you might look around for houses that do a 
  39.   better job of informing the public.  But I hope you'll take 
  40.   the time to consider everybody's role in the shareware 
  41.   marketing scene; if you do, I think you'll conclude that 
  42.   although you may have been misled, you haven't really been 
  43.   cheated out of anything. 
  44.  
  45.   Shareware is great for authors like me, who have spent all 
  46.   their years in their computer holes, learning to be great 
  47.   programmers, and no time in business school learning 
  48.   marketing and distribution techniques.  We simply cast our 
  49.   programs to the winds.  They are distributed at practically 
  50.   no cost to us.  That's why we can charge a lot less than 
  51.   the cost of "commercial" software. 
  52.  
  53.   Shareware is also great for customers like you.  You can 
  54.   try out the software before paying for it.  You'll know 
  55.   that a successful shareware product is good, because only 
  56.   satisfied customers pay for it.  The existence of shareware 
  57.   infuses healthy competition in the entire software market, 
  58.   for both price and quality.  In the case of A86, I'm 
  59.   utterly convinced that you'll never find a better value for 
  60.   an assembler, anywhere. 
  61.                                                         0-2
  62.   Finally, let's consider the distribution houses.  They 
  63.   provide a legitimate service, for which they charge a 
  64.   reasonable price. The best houses act as librarians, 
  65.   evaluating and cataloguing software.  Most pay thousands of 
  66.   dollars for advertising. Their cut is far less than the 
  67.   distributor's cut for "commercial" software (they prosper 
  68.   because their volume is bigger).  Most customers for the 
  69.   distribution houses are repeat customers, who are aware of, 
  70.   and happy with, what they are getting.  If it weren't for 
  71.   your XYZ House, you might never have heard of A86, or might 
  72.   never have figured out where to obtain it. 
  73.  
  74.   So I hope you'll be happy with shareware, and actively 
  75.   desire to support it.  You'll feel good about promoting a 
  76.   healthy situation for everybody.  And you'll encourage the 
  77.   best programmers in the world to keep writing for you, 
  78.   instead of for the big corporations. 
  79.  
  80.  
  81. Now that I've said that, let's move on to the package.   The 
  82. A86 package consists of the four programs A86.COM, XREF.COM, 
  83. EXMAC.COM, and FAKE.EXE; a collection of source, batch, and 
  84. library files used by the demonstration contained in Chapter 
  85. 2, and a sequence of DOC files that, when printed out in 
  86. order, make the manual.  Each chapter is a DOC file whose 
  87. name is A??.DOC, where ?? runs from 00 though 17.  Exception: 
  88. chapter 6 is split into A06A.DOC and A06B.DOC.  The second 
  89. file is wider, and should be printed at 12 cpi if you can 
  90. manage it.  The other files can print at 10cpi with margins. 
  91.  
  92.                                                         0-3
  93. TABLE OF CONTENTS
  94.  
  95.  
  96. CHAPTER 1   INTRODUCTION AND LEGAL TERMS
  97.  
  98.   Introduction                             1-1
  99.   Legal Terms and Conditions               1-1
  100.   Registration Benefits                    1-3
  101.   Overview of A86                          1-4
  102.   About the Author                         1-6
  103.   How to Get in Touch With Me              1-6
  104.  
  105.  
  106. CHAPTER 2   A86 DEMONSTRATION
  107.  
  108.   Demonstration of A86 and Associated Tools                 2-1
  109.   Assembling a Very Short Program: PAGE.COM                 2-1
  110.   Demonstration of Error-Reporting                          2-1
  111.   Assembling a Longer Program with Library Files: REV.COM   2-1
  112.   Using XREF on a medium-sized program: TCOLS.COM           2-2
  113.   Using EXMAC                                               2-2
  114.  
  115.  
  116. CHAPTER 3   OPERATION AND REQUIREMENTS
  117.  
  118.   Creating Programs to Assemble             3-1
  119.   Program Invocation                        3-1
  120.   Assembler Switches                        3-2
  121.   The A86 Environment Variable              3-4
  122.   Using Standard Input as a Command Tail    3-4
  123.   Strategies for Source File Maintenance    3-5
  124.   System Requirements for A86               3-6
  125.  
  126.  
  127. CHAPTER 4   ELEMENTS OF THE A86 LANGUAGE
  128.  
  129.   The A86 Language and the A86 Program               4-1
  130.   General Categories of A86 Elements                 4-1
  131.   Operand Typing and Code Generation                 4-3
  132.   Registers                                          4-3
  133.   Variables                                          4-3
  134.   Labels                                             4-4
  135.   Constants                                          4-4
  136.   Generating Opcodes from General Purpose Mnemonics  4-4
  137.  
  138.  
  139. CHAPTER 5   SOME EXCLUSIVE FEATURES OF A86
  140.  
  141.   The IF Statement                               5-1
  142.   Multiple operands to PUSH, POP, INC, DEC       5-1
  143.   Conditional Return Instructions                5-2
  144.   A86 extensions to the MOV instruction          5-2
  145.   Local Labels                                   5-3
  146.   Operands to AAM and AAD Instructions           5-4
  147.   Single-Operand Forms of the TEST Instruction   5-4
  148.                                                            0-4
  149. CHAPTER 6    THE 86 INSTRUCTION SET
  150.  
  151.   Effective Addresses                            6-1
  152.   Segmentation and Effective Addresses           6-2
  153.   Effective Use of Effective Addresses           6-3
  154.   Encoding of Effective Addresses                6-4
  155.   Table of Effective Address byte values         6-5
  156.   How to Read the Instruction Set Chart          6-6
  157.   The Instruction Set Chart                      6-8
  158.  
  159.  
  160. CHAPTER 7   THE FLOATING-POINT PROCESSOR
  161.  
  162.   The 8087 and 287 Coprocessors          7-1
  163.   Emulating the 8087 by Software         7-2
  164.   The Floating Point Stack               7-3
  165.   Floating Point Initializations         7-3
  166.   Built-In Constant Names                7-3
  167.   Special Immediate FLD Form             7-4
  168.   Floating Point Operand Types           7-4
  169.   Operand Choices in A86                 7-5
  170.   The 87 Instruction Set                 7-5
  171.  
  172.  
  173. CHAPTER 8   NUMBERS AND EXPRESSIONS
  174.  
  175.   Numbers and Bases                      8-1
  176.   The RADIX Directive                    8-2
  177.   Floating-point Initializations         8-2
  178.   Overview of Expressions                8-3
  179.   Types of Expression Operands           8-4
  180.   Numbers and Label Addresses            8-4
  181.   Variables                              8-4
  182.   Index Expressions                      8-4
  183.   Arithmetic Operators                   8-4
  184.   HIGH/LOW                               8-4
  185.   BY                                     8-5
  186.   Addition (combination)                 8-5
  187.   Subtraction                            8-5
  188.   Multiplication and Division            8-6
  189.   Shifting Operators                     8-6
  190.   Logical Operators                      8-6
  191.   Boolean Negation Operator              8-7
  192.   Relational Operators                   8-7
  193.   String Comparison Operators            8-8
  194.   Attribute Operators/Specifiers         8-8
  195.   B,W,D,Q,T Memory Variable Specifiers   8-8
  196.   SHORT and LONG operators               8-8
  197.   OFFSET operator                       8-10
  198.   NEAR Operator                         8-10
  199.   Square Brackets Operator              8-10
  200.   Colon Operator                        8-10
  201.   ST Operator                           8-11
  202.   TYPE Operator                         8-11
  203.   THIS and $ Specifiers                 8-12
  204.   Operator Precedence                   8-12
  205.                                                          0-5
  206. CHAPTER 9   DIRECTIVES IN A86
  207.  
  208.   Segments in A86                                 9-1
  209.   CODE ENDS and DATA ENDS Statements              9-2
  210.   The ORG Directive                               9-2
  211.   The EVEN Directive                              9-3
  212.   Data Allocation Using DB, DW, DD, DQ, and DT    9-3
  213.   The STRUC Directive                             9-6
  214.   Forward References                              9-6
  215.   Forward References in Expressions               9-7
  216.   The EQU Directive                               9-8
  217.   Equates to Built-In Symbols                     9-8
  218.   The NIL Prefix                                  9-9
  219.   Interrupt Equates                               9-9
  220.   Duplicate Definitions                           9-9
  221.   The = Directive                                9-10
  222.   The PROC Directive                             9-10
  223.   The ENDP Directive                             9-11
  224.   The LABEL Directive                            9-11
  225.  
  226.  
  227. CHAPTER 10   RELOCATION AND LINKAGE
  228.  
  229.   .OBJ Production Made Easy                          10-1
  230.   Overview of Relocation and Linkage                 10-3
  231.   The NAME Directive                                 10-5
  232.   The PUBLIC Directive                               10-5
  233.   The EXTRN Directive                                10-6
  234.   MAIN: The Starting Location for a Program          10-7
  235.   The END Directive                                  10-7
  236.   The SEGMENT Directive                              10-8
  237.   DATA SEGMENT, STRUC and CODE SEGMENT Directives   10-11
  238.   The ENDS Directive                                10-11
  239.   Default Outer SEGMENT                             10-12
  240.   The GROUP Directive                               10-12
  241.   The SEG Operator                                  10-13
  242.                                                             0-6
  243. CHAPTER 11   MACROS AND CONDITIONAL ASSEMBLY
  244.  
  245.   Macro Facility                                     11-1
  246.   Simple Macro Syntax                                11-1
  247.   Formatting in macro definitions and calls          11-2
  248.   Macro operand substitution                         11-2
  249.   Quoted-string operands                             11-3
  250.   Looping by operands in macros                      11-4
  251.   The #L last operator and indefinite repeats        11-5
  252.   Character-loops                                    11-5
  253.   The "B"-before and "A"-after operators             11-6
  254.   Multiple-increments within loops                   11-6
  255.   Negative R-loops                                   11-7
  256.   Nesting of loops in macros                         11-8
  257.   Implied closing of loops                           11-8
  258.   Passing Operands by Value                          11-8
  259.   Passing Operand Size                               11-8
  260.   Generating the Number of an Operand                11-9
  261.   Parenthesized Operand Numbers                      11-9
  262.   Exiting from the Middle of a Macro                11-10
  263.   Local labels in macros                            11-10
  264.   Debugging macro expansions                        11-11
  265.   Conditional Assembly                              11-11
  266.   Conditional Assembly and Macros                   11-13
  267.   Simulating MASM's Conditional Assembly Constructs 11-14
  268.   Conditional Assembly and the XREF Program         11-14
  269.   Declaring Variables in the Assembler Invocation   11-14
  270.   Null Invocation Variable Names                    11-15
  271.   Changing Values of Invocation Variables           11-15
  272.  
  273.  
  274. CHAPTER 12   COMPATIBILITY WITH OTHER ASSEMBLERS
  275.  
  276.   Conversion of Intel/IBM/MASM programs to A86      12-1
  277.   Compatibility-symbols recognized by A86           12-4
  278.   Conversion of A86 Programs to Intel/IBM/MASM      12-5
  279.  
  280.  
  281. CHAPTER 13   ASSOCIATED TOOLS
  282.  
  283.   XREF Cross-reference and Symbol Listing Facility    13-1
  284.   EXMAC Macro Expansion Tool                          13-2
  285.   A86LIB Source File Library Tool                     13-3
  286.   Using A86.LIB in A86 Assemblies                     13-4
  287.   Environment Variable A86LIB                         13-5
  288.   Forcing a Library Search                            13-5
  289.   Listings with A86                                   13-5
  290.   Mimicking Tool: FAKE.EXE                            13-7
  291.  
  292. CHAPTER 14   DESCRIPTIONS OF A86 ERROR MESSAGES
  293.  
  294. CHAPTER 15   RELEASE HISTORY OF A86
  295.  
  296. CHAPTER 16    RESERVED SYMBOLS IN THE A86 LANGUAGE
  297.  
  298. INDEX
  299.  
  300.